import request from '@/utils/request'

/**
 * get-home-list
 * @param {cityId,start,end} params
 */

export const getHouses = (cityId) => {
  return request({
    url: '/houses',
    params: {
      cityId
    }
  })
}

export const getCondition = (id) => {
  return request({
    url: '/houses/condition',
    params: {
      id
    }
  })
}

export const getJqhouse = (obj, value, price) => {
  return request.get('/houses', {
    params: {
      cityId: obj.value,
      more: Object.values(value).join(','),
      price
    }
  })
}

export const getDetails = (id) => {
  return request({
    url: '/houses',
    params: {
      id
    }
  })
}
